package hamaster.jpbc.crypt;

public interface Crypt {

	/**
	 * encrypt 128-bit plaintext using key previously set.
	 * @param plain the 128-bit plaintext value to encrypt.
	 * @return the encrypted 128-bit ciphertext value.
	 */
	byte[] encrypt(byte[] plain);

	/**
	 * decrypt 128-bit ciphertext using key previously set.
	 * @param cipher the 128-bit ciphertext value to decrypt.
	 * @return the decrypted 128-bit plaintext value.
	 */
	byte[] decrypt(byte[] cipher);

	/**
	 * Expand a user-supplied key material into a session key.
	 * @param key The 128/192/256-bit key to use.
	 */
	void setKey(byte[] key);

	void setBlockSize(int blockSize);

}